﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServiceInterface;
using ServiceStack.WebHost.Endpoints;

namespace ServiceHost
{
    public class AppHost : AppHostHttpListenerBase
    {
        public AppHost()
            : base("User Service", typeof(AuthentificationService).Assembly)
        {

        }
        public override void Configure(Funq.Container container)
        {
            //Signal advanced web browsers what HTTP Methods you accept
            base.SetConfig(new EndpointHostConfig
            {
                GlobalResponseHeaders =
				{
					{ "Access-Control-Allow-Origin", "*" },
					//{ "Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS" },
					{ "Access-Control-Allow-Methods", "GET, PUT" },
				},
                WsdlServiceNamespace = "http://www.servicestack.net/types",
            });
        }
    }
}
